<?php
/**
 * @package Green Realty component
 * @copyright (C) 2012 Greenkey studio. All rights reserved
 * @license GNU/GPL Version 2 - http://www.gnu.org/licenses/gpl-2.0.html
 * @author Greenkey studio
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');
// import Joomla html for use with stylesheets
jimport('joomla.html.html');

/**
 * HTML View class for the UpdHelloWorld Component
 */
class GRealtyViewUpdGrealty extends JView
{
	// Overwriting JView display method
	function display($tpl = null)
	{
		$app		= JFactory::getApplication();
		$params		= $app->getParams();
		$dispatcher = JDispatcher::getInstance();

		// Get some data from the models
		$state		= $this->get('State');
		$item		= $this->get('Item');
		$this->form	= $this->get('Form');

        $this->state = $state;

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode('<br />', $errors));
			return false;
		}
		// get the stylesheet and/or other document values such as title
        $this->addDocStyle();
		// Display the view
		parent::display($tpl);
	}
}
?>
